// 实现单例
export default class Singleton {
  // 私有的静态属性
  private static _instance: any = null

  // 公有的静态方法
  static getInstance<T>(): T {
    if (this._instance === null) {
      this._instance = new this()
    }
    return this._instance
  }
}
